package org.duang.vtor.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.FIELD,ElementType.METHOD}) 
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Vtor {
	
	 boolean isEmpty() default true;		//是否允许为null为空字串符 默认为允许
	 
	 int length() default 0;	 			//长度
	 
	 double[] range() default 0;			//范围
	 
	 String desc() default "";				//设置字段名	
	 
	 String value() default "";				//默认值
	 
	 String formatDate() default "yyyy-MM-dd HH:mm:ss";		//格式化日期(24小时制)
	 
	 boolean oid() default false;					//是否是mongodb objectId
}
/**
 * validator.assertFalse=assertion failed

validator.assertTrue=assertion failed

validator.future=must be a future date

validator.length=length must be between {min} and {max}

validator.max=must be less than or equal to {value}

validator.min=must be greater than or equal to {value}

validator.notNull=may not be null

validator.past=must be a past date

validator.pattern=must match "{regex}"

validator.range=must be between {min} and {max}

validator.size=size must be between {min} and {max}
*/
